package com.a1anwang.okble.demo;

import com.a1anwang.okble.client.core.OKBLEDevice;
import com.a1anwang.okble.client.scan.BLEScanResult;
import com.a1anwang.okble.common.OKBLECharacteristicModel;
import ohos.aafwk.ability.AbilityPackage;

/**
 * Created by a1anwang.com on 2018/5/16.
 */
public class APP extends AbilityPackage {
    private static APP app = null;
    /**
     * OKBLEDevice  OKBLEDevice对象
     */
    public OKBLEDevice okbleDevice;
    /**
     * BLEScanResult  BLEScanResult对象
     */
    public BLEScanResult scanResult;

    private OKBLECharacteristicModel characteristicModel;

    @Override
    public void onInitialize() {
        super.onInitialize();
    }

    public OKBLECharacteristicModel getCharacteristicModel() {
        return characteristicModel;
    }

    public void setCharacteristicModel(OKBLECharacteristicModel characteristicModel) {
        this.characteristicModel = characteristicModel;
    }

    public BLEScanResult getScanResult() {
        return scanResult;
    }

    public void setScanResult(BLEScanResult scanResult) {
        this.scanResult = scanResult;
    }

    /**
     * 构造函数
     *
     * @return AbilityPackage对象
     */
    public static APP getApp() {
        if (app == null) {
            app = new APP();
        }
        return app;
    }
}
